home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d18
/
qwik30.arc
/
CURSOR.DOC
next >
Wrap
Text File
|
1991-01-09
|
5KB
|
92 lines
{ Cursor.doc - documentation for Cursor.inc ver 3.0, 08-31-87 }
GotoRC - Like Turbo's GotoXY, this procedure moves the cursor, but with a
couple of important differences. The cursor is always relative to the
entire screen and ignores the limits set by the Turbo Window procedure. In
addition, it will work on all the other video pages besides page 0.
CursorChange - This procedure will let you change the mode (shape and
visibility) of the cursor. At the same time, it saves the previous mode.
Using hex is the easiest way to set the integer. The shape of the cursor
is defined by horizontal scan lines in the character cell where the top row
is of any cell is 0. The starting (upper) row of the cursor mode is the
high (or left) byte of the integer and the ending (lower) row is the low
(or right) byte. In addition, bits 5 and 6 of the starting row byte
control on/off and erratic blinking (remember a byte has bits 0 to 7). See
QINIT.DOC for cell sizes.
Shape: Adapter Default Comments
-------- ------- -------------------------
MDA $0B0C
CGA,MCGA $0607
EGA $0B0C MD, ECD (640x350 25-line)
EGA $0607 CD, ECD (640x200)
VGA $0D0E Emulation off
Cursor off: Set start row bits 6-5 = 01. All other bits don't matter.
Blinking: Set start row bits 6-5 = 11. Creates erratic blinking on
most machines.
Suggestions: For block cursor, set New:=$000D (Works on all machines.)
For hidden cursor, set New:=$2000
CursorOff - Rather than using CursorChange to hide the cursor, use this
procedure. You don't have to save the current cursor shape since all it
does is set the cursor-off bit on the current cursor mode.
CursorOn - To restore the cursor after turning it off with CursorOff, use
this procedure. The previous shape is maintained.
Suggestions - Use discretion when changing the cursor mode. Some users
prefer a block cursor for all their applications. If your program forces
it to an underline, try to restore the original cursor. Programs like
Turbo and WordStar, never even touch the cursor. There is only one case
that I know where you must set the cursor mode before using CursorOff/On.
The early PCs had a bug in the BIOS that set the MDA default to be CGA
instead. You can check for ActiveDD=MdaMono and a $0607 cursor. If so,
change it to $0B0C for an underline.
EGA Cursor Emulation - With 640x200, the emulation works fairly well. With
640x350 and 25-line mode, the emulation works, too. Outside of that, it is
suggested that any needed changes should be made with emulation off which
can be done be setting bit 0 of EgaInfo equal to 1.
MCGA Cursor Emulation - Use the CGA cursor cell size even though the
character cell is 8x16. The BIOS multiplies the start and end rows by 2
and then adds one to the end row before writing to the hardware video port
to emulate the CGA.
VGA Cursor Emulation - Qinit sets the cursor emulation mode on so you don't
have to worry about special fonts and cells sizes. The only cell sizes you
need to know is the MDA and CGA. The video BIOS will adjust your cursor
shape to fit in the current cell size. Here's the cursor shapes (types)
recognized by the VGA algorithm and how it responds:
Cursor Type Condition Action
------------ ------------------- ---------------
Hidden (off) start bits 6-5 = 01 pass
Split start > end invert to block
Overbar start < end <= 3 pass
Underline start+2 >= end adjust
Full-block start <= 2 adjust
Half-block start > 2 adjust
For adjustment, three more tests are required:
Condition Action
-------------------------------- ----------
start or end >= cell height adjust
end = cell height - 1 pass
start = cell height - 2 pass
The final adjustment is made to the corresponding cursor type:
Cursor Type Adjustment
----------- -------------------------------------------------
Overbar pass
Underline move start/end to bottom of cell
Half-block start = cell height/2; move end to bottom of cell
Full-block move end to bottom of cell